package com.geekcoding.geekoj.entity;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.TableName;
import com.geekcoding.geekoj.nums.TestType;
import lombok.*;
import lombok.experimental.SuperBuilder;

import java.util.Date;

@EqualsAndHashCode(callSuper = true)
@TableName("geekoj_test")
@Data
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
public class Test extends BaseEntity{

    private String subjectId;

    private String answerId;

    private String correctorId;

    private Date answerTime;

    @EnumValue
    private TestType type;

    private Integer score;

    private Integer successNum;

    private Integer errorNum;

    /**
     * 练习状态
     */
    @EnumValue
    @Builder.Default
    private TestStatus state = TestStatus.INIT;
}
